using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Data;

namespace NLite.Data
{
    public  partial class NameValue:ICloneable,IEquatable<NameValue>
    {
        public IColumnNode Name { get; private set; }
        public object Value { get; private set; }

        public NameValue(IColumnNode name, object value)
        {
            Name = name;
            Value = value;
        }

        public bool Equals(NameValue other)
        {
            if (other == null) return false;
            if (object.ReferenceEquals(this, other)) return true;
            if (!object.Equals(Name, other.Name)) return false;
            return object.Equals(Value, other.Value);
        }

        public override bool Equals(object obj)
        {
            return base.Equals(obj as NameValue);
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
    }
}